<template>
<div>
  <el-table
      :data="ListTbale"
      style="width: 100%" :header-cell-style="tableHeaderColor">
    <el-table-column
        prop="insure_no"
        label="保单号"
        align="center"
        width="200">
    </el-table-column>
    <el-table-column
        prop="name"
        align="center"
        label="姓名"
        width="180">
    </el-table-column>
    <el-table-column
        prop="id_card_no"
        align="center"
        label="证件号码"
        width="180">
    </el-table-column>
    <el-table-column
        prop="actual_unit"
        align="center"
        label="用工单位"
        width="180">
    </el-table-column>
    <el-table-column
        prop="reason"
        align="center"
        label="赔偿金额">
    </el-table-column>
    <el-table-column
        prop="update_time"
        align="center"
        label="创建时间">
    </el-table-column>
    <!--        <el-table-column-->
    <!--            align="center"-->
    <!--            label="操作">-->
    <!--          <template slot-scope="scope">-->
    <!--            <el-button type="text" size="small" @click="getDetails2">查看详情</el-button>-->
    <!--          </template>-->
    <!--        </el-table-column>-->
  </el-table>
  <pagination
      style="background: transparent"
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
  />
</div>
</template>

<script>
import {message_list} from "@/api/insurancemanagement/MessageNotification"
export default {
  name: "index",
  data() {
    return {
      queryParams: {
        user_id: '',//当前操作人
        pageNum: 1,
        // page:1,
        pageSize: 10,
        type: 3,//报案审核
        // 总条数
      },
      ListTbale: [],
      total: 0
    }
  },
  methods: {
    /* 修改表头颜色 */
    tableHeaderColor({ rowIndex }) {
      if (rowIndex === 0) {
        return 'background-color: #304156;color: #fff;font-weight: 400;font-family: Microsoft YaHei;'
      }
    },
    //跳转到报案记录页面
    getDetails1() {
      this.$router.push({
        path: '/business/repordRecord/index'
      })
    },
    getList() {
      message_list(this.queryParams).then(res => {
        this.ListTbale = res.data.list;
        this.total = res.data.count;
        // console.log('理赔res', res)
      })
    }
  },
  created() {
    this.queryParams.user_id = JSON.parse(localStorage.getItem('userInfo')).userId;
    this.getList();
  }
}
</script>

<style scoped>

</style>
